import React, {Component} from 'react'
import  './music.css'
class Music extends Component {
    deal(num){
        if(num>=100000000){
            return Math.floor(num/10000000)/10+"亿"
        }else if(num>=10000){
            return Math.floor(num/1000)/10+"万"
        }
        return num
    }
    render() {
        return ( 
            <div className="content">
                <img className="" src={this.props.data.coverImgUrl} alt=""></img>
                <div className="">{this.props.data.name}</div>
                <div className="playCount">{this.deal(this.props.data.playCount)}</div>
            </div> 
        );
    }
}

export default Music;